#pragma once

#include "CRunicCore.h"
#include "CBaseUnit.h"

namespace TLAPI {

#pragma pack(1)

  // Stripped from EffectsList.dat
  enum EffectType {
    KEFFECT_TYPE_MELEEDAMAGEBONUS = 0,
    KEFFECT_TYPE_RANGEDDAMAGEBONUS,
    KEFFECT_TYPE_DEFENSE,
    KEFFECT_TYPE_MAGIC,
    KEFFECT_TYPE_MAX_MANA,
    KEFFECT_TYPE_MAX_HP,
    KEFFECT_TYPE_MANA_RECHARGE,
    KEFFECT_TYPE_HP_RECHARGE,
    KEFFECT_TYPE_ARMOR_BONUS,
    KEFFECT_TYPE_TO_HIT_BONUS,
    KEFFECT_TYPE_DAMAGE_BONUS,
    KEFFECT_TYPE_DAMAGE_TAKEN,
    KEFFECT_TYPE_KNOCK_BACK,
    KEFFECT_TYPE_SIGHT_BONUS,
    KEFFECT_TYPE_VIEW_ANGLE_BONUS,
    KEFFECT_TYPE_PERCENT_MELEEDAMAGE,
    KEFFECT_TYPE_PERCENT_RANGEDDAMAGE,
    KEFFECT_TYPE_PERCENT_DEFENSE,
    KEFFECT_TYPE_PERCENT_MAGIC,
    KEFFECT_TYPE_PERCENT_MANA,
    KEFFECT_TYPE_PERCENT_HP,
    KEFFECT_TYPE_PERCENT_SPEED,
    KEFFECT_TYPE_PERCENT_ATTACK_SPEED,
    KEFFECT_TYPE_PERCENT_ARMOR_BONUS,
    KEFFECT_TYPE_PERCENT_TO_HIT_BONUS,
    KEFFECT_TYPE_PERCENT_DAMAGE_BONUS,
    KEFFECT_TYPE_PERCENT_DAMAGE_TAKEN,
    KEFFECT_TYPE_PERCENT_MAGICAL_DROP,
    KEFFECT_TYPE_PERCENT_GOLD_DROP,
    KEFFECT_TYPE_PERCENT_CAST_SPEED,
    KEFFECT_TYPE_PERCENT_LIFE_STOLEN,
    KEFFECT_TYPE_PERCENT_MANA_STOLEN,
    KEFFECT_TYPE_PERCENT_DAMAGE_REFLECTED,
    KEFFECT_TYPE_PERCENT_BLOCK_CHANCE,
    KEFFECT_TYPE_PERCENT_ITEM_REQUIREMENTS,
    KEFFECT_TYPE_PHYSICAL_DEFENSE,
    KEFFECT_TYPE_MAGICAL_DEFENSE,
    KEFFECT_TYPE_FIRE_DEFENSE,
    KEFFECT_TYPE_ICE_DEFENSE,
    KEFFECT_TYPE_ELECTRICAL_DEFENSE,
    KEFFECT_TYPE_POISON_DEFENSE,
    KEFFECT_TYPE_PERCENT_SIGHT_BONUS,
    KEFFECT_TYPE_PERCENT_VIEW_ANGLE_BONUS,
    KEFFECT_TYPE_KNOCK_BACK_EFFECT,
    KEFFECT_TYPE_PERCENT_ACTIVE_DISTANCE_BONUS,
    KEFFECT_TYPE_OPEN_TOWN_PORTAL,
    KEFFECT_TYPE_IDENTIFY,
    KEFFECT_TYPE_SUMMON_DURATION,
    KEFFECT_TYPE_DAMAGE_REFLECTION,
    KEFFECT_TYPE_LIFE_STEAL,
    KEFFECT_TYPE_MANA_STEAL,
    KEFFECT_TYPE_GOLD_DROP,
    KEFFECT_TYPE_DAMAGE,
    KEFFECT_TYPE_PERCENT_KNOCK_BACK_RESISTANCE,
    KEFFECT_TYPE_DEGRADE_ARMOR,
    KEFFECT_TYPE_CRITICAL_CHANCE,
    KEFFECT_TYPE_INTERRUPT_CHANCE,
    KEFFECT_TYPE_TRANSFORM,
    KEFFECT_TYPE_UNIT_THEME,
    KEFFECT_TYPE_SCALE,
    KEFFECT_TYPE_MISSILE_REFLECT,
    KEFFECT_TYPE_MISSILE_REFLECT_VISUAL,
    KEFFECT_TYPE_PERCENT_BLOCK_CHANCE_BASE,
    KEFFECT_TYPE_VELOCITY_MULT,
    KEFFECT_TYPE_STUN,
    KEFFECT_TYPE_LEARN_SKILL,
    KEFFECT_TYPE_DEGRADE_ARMOR_EFFECT,
    KEFFECT_TYPE_DESUMMON_MONSTER,
    KEFFECT_TYPE_XP_GAIN_BONUS,
    KEFFECT_TYPE_STRENGTH_BONUS,
    KEFFECT_TYPE_DEXTERITY_BONUS,
    KEFFECT_TYPE_PERCENT_STRENGTH_BONUS,
    KEFFECT_TYPE_PERCENT_DEXTERITY_BONUS,
    KEFFECT_TYPE_TRANSFORM_PERMANENT,
    KEFFECT_TYPE_CAST_SKILL,
    KEFFECT_TYPE_CAST_SKILL_ON_TARGET,
    KEFFECT_TYPE_CAST_SKILL_AT_TARGET,
    KEFFECT_TYPE_FAME_GAIN_BONUS,
    KEFFECT_TYPE_MISSILE_RANGE_BONUS,
    KEFFECT_TYPE_FLEE_EFFECT,
    KEFFECT_TYPE_TURN_ALIGNMENT,
    KEFFECT_TYPE_CAST_SKILL_ON_STRUCK,
    KEFFECT_TYPE_SKILL_BONUS,
    KEFFECT_TYPE_PRICE_REDUCTION,
    KEFFECT_TYPE_FISHING_LUCK,
    KEFFECT_TYPE_ATTACK_SPELL_BONUS,
    KEFFECT_TYPE_DEFENSE_SPELL_BONUS,
    KEFFECT_TYPE_CHARM_SPELL_BONUS,
    KEFFECT_TYPE_DUAL_WIELDING_BONUS,
    KEFFECT_TYPE_PERCENT_CRITICAL_DAMAGE,
    KEFFECT_TYPE_POTION_EFFICIENCY,
    KEFFECT_TYPE_PERCENT_PET_DAMAGE,
    KEFFECT_TYPE_PERCENT_PET_VELOCITY,
    KEFFECT_TYPE_REDUCED_ITEM_REQUIREMENTS,
    KEFFECT_TYPE_ARMOR_ITEM_REQUIREMENTS,
    KEFFECT_TYPE_SPELL_REQUIREMENTS,
    KEFFECT_TYPE_PET_DEPARTURE_TIME,
    KEFFECT_TYPE_PERCENT_PET_ARMOR,
    KEFFECT_TYPE_MARTIAL_ITEM_REQUIREMENTS,
    KEFFECT_TYPE_PERCENT_MARTIAL_ITEM_DAMAGE_BONUS,
    KEFFECT_TYPE_RANGED_ITEM_REQUIREMENTS,
    KEFFECT_TYPE_MAGIC_ITEM_REQUIREMENTS,
    KEFFECT_TYPE_PERCENT_RANGED_ITEM_DAMAGE_BONUS,
    KEFFECT_TYPE_PERCENT_MAGIC_ITEM_DAMAGE_BONUS,
    KEFFECT_TYPE_PERCENT_PET_HEALTH,
    KEFFECT_TYPE_CAST_SKILL_ON_DEATH,
    KEFFECT_TYPE_FREEZE,
    KEFFECT_TYPE_BURN,
    KEFFECT_TYPE_POISON,
    KEFFECT_TYPE_SHOCK,
    KEFFECT_TYPE_KILL,
    KEFFECT_TYPE_FADE_OUT,
    KEFFECT_TYPE_SET_VISIBLE,
    KEFFECT_TYPE_WARP,
    KEFFECT_TYPE_PERMANENT_STRENGTH,
    KEFFECT_TYPE_PERMANENT_DEXTERITY,
    KEFFECT_TYPE_PERMANENT_MAGIC,
    KEFFECT_TYPE_PERMANENT_HEALTH,
    KEFFECT_TYPE_PERMANENT_DEFENSE,
    KEFFECT_TYPE_PERMANENT_MANA,
    KEFFECT_TYPE_AWARD_STATPOINT,
    KEFFECT_TYPE_FLEE_RESIST,
    KEFFECT_TYPE_SHIELD_BUFFER,
    KEFFECT_TYPE_MANA_RECHARGE_PLAYER,
    KEFFECT_TYPE_HP_RECHARGE_PLAYER,
    KEFFECT_TYPE_LIFE_STEAL_MASTER,
    KEFFECT_TYPE_PERCENT_LIFE_STOLEN_MASTER,
    KEFFECT_TYPE_STOP_SKILL,
    KEFFECT_TYPE_SILENCE,
    KEFFECT_TYPE_DESUMMON_ON_DEATH,

    // I have emotional damage after this enumeration.
    KEFFECT_TYPE_EMOTIONAL_DAMAGE,
    KEFFECT_TYPE_FUTURISTICNESS,
    KEFFECT_TYPE_JAUNTINESS,
    KEFFECT_TYPE_SOCKS,
    KEFFECT_TYPE_LOGIC_RESISTANCE,
    KEFFECT_TYPE_NOODLE_ARMS,

    KEFFECT_TYPE_INTERRUPT_RESISTANCE,
    KEFFECT_TYPE_CHARM_RESISTANCE,
    KEFFECT_TYPE_SILENCE_RESISTANCE,
    KEFFECT_TYPE_STUN_RESISTANCE,
    KEFFECT_TYPE_SLOW_RESISTANCE,
    KEFFECT_TYPE_OPEN_PORTAL,
    KEFFECT_TYPE_SWAP_POS_WITH_PET,
    KEFFECT_TYPE_RESPEC,
    KEFFECT_TYPE_PERCENT_BLIND,
  };

  static const char* EffectTypeName[] = {
    "KEFFECT_TYPE_MELEEDAMAGEBONUS",
    "KEFFECT_TYPE_RANGEDDAMAGEBONUS",
    "KEFFECT_TYPE_DEFENSE",
    "KEFFECT_TYPE_MAGIC",
    "KEFFECT_TYPE_MAX_MANA",
    "KEFFECT_TYPE_MAX_HP",
    "KEFFECT_TYPE_MANA_RECHARGE",
    "KEFFECT_TYPE_HP_RECHARGE",
    "KEFFECT_TYPE_ARMOR_BONUS",
    "KEFFECT_TYPE_TO_HIT_BONUS",
    "KEFFECT_TYPE_DAMAGE_BONUS",
    "KEFFECT_TYPE_DAMAGE_TAKEN",
    "KEFFECT_TYPE_KNOCK_BACK",
    "KEFFECT_TYPE_SIGHT_BONUS",
    "KEFFECT_TYPE_VIEW_ANGLE_BONUS",
    "KEFFECT_TYPE_PERCENT_MELEEDAMAGE",
    "KEFFECT_TYPE_PERCENT_RANGEDDAMAGE",
    "KEFFECT_TYPE_PERCENT_DEFENSE",
    "KEFFECT_TYPE_PERCENT_MAGIC",
    "KEFFECT_TYPE_PERCENT_MANA",
    "KEFFECT_TYPE_PERCENT_HP",
    "KEFFECT_TYPE_PERCENT_SPEED",
    "KEFFECT_TYPE_PERCENT_ATTACK_SPEED",
    "KEFFECT_TYPE_PERCENT_ARMOR_BONUS",
    "KEFFECT_TYPE_PERCENT_TO_HIT_BONUS",
    "KEFFECT_TYPE_PERCENT_DAMAGE_BONUS",
    "KEFFECT_TYPE_PERCENT_DAMAGE_TAKEN",
    "KEFFECT_TYPE_PERCENT_MAGICAL_DROP",
    "KEFFECT_TYPE_PERCENT_GOLD_DROP",
    "KEFFECT_TYPE_PERCENT_CAST_SPEED",
    "KEFFECT_TYPE_PERCENT_LIFE_STOLEN",
    "KEFFECT_TYPE_PERCENT_MANA_STOLEN",
    "KEFFECT_TYPE_PERCENT_DAMAGE_REFLECTED",
    "KEFFECT_TYPE_PERCENT_BLOCK_CHANCE",
    "KEFFECT_TYPE_PERCENT_ITEM_REQUIREMENTS",
    "KEFFECT_TYPE_PHYSICAL_DEFENSE",
    "KEFFECT_TYPE_MAGICAL_DEFENSE",
    "KEFFECT_TYPE_FIRE_DEFENSE",
    "KEFFECT_TYPE_ICE_DEFENSE",
    "KEFFECT_TYPE_ELECTRICAL_DEFENSE",
    "KEFFECT_TYPE_POISON_DEFENSE",
    "KEFFECT_TYPE_PERCENT_SIGHT_BONUS",
    "KEFFECT_TYPE_PERCENT_VIEW_ANGLE_BONUS",
    "KEFFECT_TYPE_KNOCK_BACK_EFFECT",
    "KEFFECT_TYPE_PERCENT_ACTIVE_DISTANCE_BONUS",
    "KEFFECT_TYPE_OPEN_TOWN_PORTAL",
    "KEFFECT_TYPE_IDENTIFY",
    "KEFFECT_TYPE_SUMMON_DURATION",
    "KEFFECT_TYPE_DAMAGE_REFLECTION",
    "KEFFECT_TYPE_LIFE_STEAL",
    "KEFFECT_TYPE_MANA_STEAL",
    "KEFFECT_TYPE_GOLD_DROP",
    "KEFFECT_TYPE_DAMAGE",
    "KEFFECT_TYPE_PERCENT_KNOCK_BACK_RESISTANCE",
    "KEFFECT_TYPE_DEGRADE_ARMOR",
    "KEFFECT_TYPE_CRITICAL_CHANCE",
    "KEFFECT_TYPE_INTERRUPT_CHANCE",
    "KEFFECT_TYPE_TRANSFORM",
    "KEFFECT_TYPE_UNIT_THEME",
    "KEFFECT_TYPE_SCALE",
    "KEFFECT_TYPE_MISSILE_REFLECT",
    "KEFFECT_TYPE_MISSILE_REFLECT_VISUAL",
    "KEFFECT_TYPE_PERCENT_BLOCK_CHANCE_BASE",
    "KEFFECT_TYPE_VELOCITY_MULT",
    "KEFFECT_TYPE_STUN",
    "KEFFECT_TYPE_LEARN_SKILL",
    "KEFFECT_TYPE_DEGRADE_ARMOR_EFFECT",
    "KEFFECT_TYPE_DESUMMON_MONSTER",
    "KEFFECT_TYPE_XP_GAIN_BONUS",
    "KEFFECT_TYPE_STRENGTH_BONUS",
    "KEFFECT_TYPE_DEXTERITY_BONUS",
    "KEFFECT_TYPE_PERCENT_STRENGTH_BONUS",
    "KEFFECT_TYPE_PERCENT_DEXTERITY_BONUS",
    "KEFFECT_TYPE_TRANSFORM_PERMANENT",
    "KEFFECT_TYPE_CAST_SKILL",
    "KEFFECT_TYPE_CAST_SKILL_ON_TARGET",
    "KEFFECT_TYPE_CAST_SKILL_AT_TARGET",
    "KEFFECT_TYPE_FAME_GAIN_BONUS",
    "KEFFECT_TYPE_MISSILE_RANGE_BONUS",
    "KEFFECT_TYPE_FLEE_EFFECT",
    "KEFFECT_TYPE_TURN_ALIGNMENT",
    "KEFFECT_TYPE_CAST_SKILL_ON_STRUCK",
    "KEFFECT_TYPE_SKILL_BONUS",
    "KEFFECT_TYPE_PRICE_REDUCTION",
    "KEFFECT_TYPE_FISHING_LUCK",
    "KEFFECT_TYPE_ATTACK_SPELL_BONUS",
    "KEFFECT_TYPE_DEFENSE_SPELL_BONUS",
    "KEFFECT_TYPE_CHARM_SPELL_BONUS",
    "KEFFECT_TYPE_DUAL_WIELDING_BONUS",
    "KEFFECT_TYPE_PERCENT_CRITICAL_DAMAGE",
    "KEFFECT_TYPE_POTION_EFFICIENCY",
    "KEFFECT_TYPE_PERCENT_PET_DAMAGE",
    "KEFFECT_TYPE_PERCENT_PET_VELOCITY",
    "KEFFECT_TYPE_REDUCED_ITEM_REQUIREMENTS",
    "KEFFECT_TYPE_ARMOR_ITEM_REQUIREMENTS",
    "KEFFECT_TYPE_SPELL_REQUIREMENTS",
    "KEFFECT_TYPE_PET_DEPARTURE_TIME",
    "KEFFECT_TYPE_PERCENT_PET_ARMOR",
    "KEFFECT_TYPE_MARTIAL_ITEM_REQUIREMENTS",
    "KEFFECT_TYPE_PERCENT_MARTIAL_ITEM_DAMAGE_BONUS",
    "KEFFECT_TYPE_RANGED_ITEM_REQUIREMENTS",
    "KEFFECT_TYPE_MAGIC_ITEM_REQUIREMENTS",
    "KEFFECT_TYPE_PERCENT_RANGED_ITEM_DAMAGE_BONUS",
    "KEFFECT_TYPE_PERCENT_MAGIC_ITEM_DAMAGE_BONUS",
    "KEFFECT_TYPE_PERCENT_PET_HEALTH",
    "KEFFECT_TYPE_CAST_SKILL_ON_DEATH",
    "KEFFECT_TYPE_FREEZE",
    "KEFFECT_TYPE_BURN",
    "KEFFECT_TYPE_POISON",
    "KEFFECT_TYPE_SHOCK",
    "KEFFECT_TYPE_KILL",
    "KEFFECT_TYPE_FADE_OUT",
    "KEFFECT_TYPE_SET_VISIBLE",
    "KEFFECT_TYPE_WARP",
    "KEFFECT_TYPE_PERMANENT_STRENGTH",
    "KEFFECT_TYPE_PERMANENT_DEXTERITY",
    "KEFFECT_TYPE_PERMANENT_MAGIC",
    "KEFFECT_TYPE_PERMANENT_HEALTH",
    "KEFFECT_TYPE_PERMANENT_DEFENSE",
    "KEFFECT_TYPE_PERMANENT_MANA",
    "KEFFECT_TYPE_AWARD_STATPOINT",
    "KEFFECT_TYPE_FLEE_RESIST",
    "KEFFECT_TYPE_SHIELD_BUFFER",
    "KEFFECT_TYPE_MANA_RECHARGE_PLAYER",
    "KEFFECT_TYPE_HP_RECHARGE_PLAYER",
    "KEFFECT_TYPE_LIFE_STEAL_MASTER",
    "KEFFECT_TYPE_PERCENT_LIFE_STOLEN_MASTER",
    "KEFFECT_TYPE_STOP_SKILL",
    "KEFFECT_TYPE_SILENCE",
    "KEFFECT_TYPE_DESUMMON_ON_DEATH",

    "KEFFECT_TYPE_EMOTIONAL_DAMAGE",
    "KEFFECT_TYPE_FUTURISTICNESS",
    "KEFFECT_TYPE_JAUNTINESS",
    "KEFFECT_TYPE_SOCKS",
    "KEFFECT_TYPE_LOGIC_RESISTANCE",
    "KEFFECT_TYPE_NOODLE_ARMS",

    "KEFFECT_TYPE_INTERRUPT_RESISTANCE",
    "KEFFECT_TYPE_CHARM_RESISTANCE",
    "KEFFECT_TYPE_SILENCE_RESISTANCE",
    "KEFFECT_TYPE_STUN_RESISTANCE",
    "KEFFECT_TYPE_SLOW_RESISTANCE",
    "KEFFECT_TYPE_OPEN_PORTAL",
    "KEFFECT_TYPE_SWAP_POS_WITH_PET",
    "KEFFECT_TYPE_RESPEC",
    "KEFFECT_TYPE_PERCENT_BLIND",
  };

  static const char* searchForEffectName(u32 index) {
    u32 count = sizeof(EffectTypeName) / sizeof(EffectTypeName[0]);
    if (index < count) {
      return EffectTypeName[index];
    }

    return "";
  };

  // Forward decl
  struct CAffix;
  struct CEquipment;
  struct CResourceManager;
  struct CEffect;
  struct CCharacter;
  enum EnchantType;

  //
  TLFUNC(Effect_Something0,     void, __thiscall, (CEffect*, u32));
  TLFUNC(Effect_CopyCtor,       void, __thiscall, (CEffect*));
  TLFUNC(Effect_ParamCtor,      void, __thiscall, (CEffect*, u32, bool, bool, float, float, float, bool));
  TLFUNC(Effect_Character_Unk0, void, __thiscall, (CEffect*, CCharacter*, bool));

  // Size: 144h (as noted at: 0x47E3E9)
  struct CEffect : CRunicCore
  {
    u32   unk0;
    EnchantType   magicEffectType;
    u32   unk1[2];
    EffectType   effectType;      // Default: 7
    u32   unk2;                   // Default: 1
    float unk3;                   // -900.0, -1000.0

    u32   unk4[2];  // 0/1, 0
    u32   setup;    // 10001h
    u32   unk8;     // 1000100
    float unk9;     // -1 / 1
    u32   unk6[3];  // 64h, 64h, 0   or 64h, 0, 0

    CBaseUnit *pCBaseUnit;

    //u32   effectIndex;

    u32   unk5[12];

    wstring name;       // @74h

    u32   unk10[25];

    CAffix *unk7;

    float effectValueMin;
    float effectValueMax;   //@(63. * 4)

    u32 unk11[7];
    CList<u32>        listUnknown;  // @11Ch
    CList<float>      listUnknown2; // @12Ch
    //u32 unk11[15];

    CResourceManager *pCResourceManager;  // @130h

    u32 unk12[4];   // @134h

    //PVOID unkEquipment;

    // -- End - Size: 144h

    // Parameterized Ctor
    EVENT_DECL(CEffect, void, Effect_ParamCtor,
      (CEffect*, u32, bool, bool, float, float, float, bool, bool&),
      ((CEffect*)e->_this, Pz[0], (bool)Pz[1], (bool)Pz[2], *(float*)&Pz[3], *(float*)&Pz[4], *(float*)&Pz[5], (bool)Pz[6], e->calloriginal));

    /*
    //
    EVENT_DECL(CEffect, void, Effect_CopyCtor,
      (CEffect*),
      ((CEffect*)e->_this));

    //
    EVENT_DECL(CEffect, void, Effect_Character_Unk0,
      (CEffect*, CCharacter*, bool),
      ((CEffect*)e->_this, (CCharacter*)Pz[0], (bool)Pz[1]));
    */

    // Effect - Function is crashing the client, seeing what it is
    EVENT_DECL(CEffect, void, Effect_Effect_Something,
      (CEffect*, CEffect*, bool&),
      ((CEffect*)e->_this, (CEffect*)Pz[0], e->calloriginal));

    // Effect = Function is crashing client when player levels up
    EVENT_DECL(CEffect, void, Effect_Something0,
      (CEffect*, u32, bool&),
      ((CEffect*)e->_this, Pz[0], e->calloriginal));



    

    /*
    void EffectCtor(CEffect *other)
    {
      Effect_CopyCtor(other);
    }
    */

    CEffect(EffectType type, bool unk0, bool unk1, float unk2, float unk3, float unk4, bool unk5)
    {
      Effect_ParamCtor(this, type, unk0, unk1, unk2, unk3, unk4, unk5);
    }

    /*
    //
    void EffectCtor()
    {
      Effect_Ctor(this);
    }
    */

    //
    void dumpEffect() {
      //if (effectIndex == 0x80000000)
      //  return;

      logColor(B_RED, "  Effect Dump (%p)  size (%i)", this, sizeof(CEffect));
      logColor(B_RED, "    Effect Type: %s (%x)", searchForEffectName(effectType), effectType);
      //logColor(B_RED, "    Effect Index: %i", effectIndex);
      //logColor(B_RED, "    Effect Unk2: %x", unk2);
      //logColor(B_RED, "    Effect Unk3: %f", unk3);
      //logColor(B_RED, "    Effect Unk4: %x %x", unk4[0], unk4[1]);
      logColor(B_RED, "    Effect Setup: %x", setup);
      //logColor(B_RED, "    Effect Unk8: %x", unk8);
      //logColor(B_RED, "    Effect Unk9: %f", unk9);
      //logColor(B_RED, "    Effect Unk6: %x %x %x", unk6[0], unk6[1], unk6[2]);
      logColor(B_RED, "    BaseUnit: %p", pCBaseUnit);
      logColor(B_RED, "    Effect Value Min: %f", effectValueMin);
      logColor(B_RED, "    Effect Value Max: %f", effectValueMax);

      // Dump the unknown lists
      {
        logColor(B_RED, "    Effect List Unknown (u32): %p", &listUnknown);
        logColor(B_RED, "      size: %i, capacity: %i", listUnknown.size, listUnknown.capacity);
        logColor(B_RED, "      elements: ");
        for (u32 i = 0; i < listUnknown.size; ++i) {
          logColor(B_RED, "        [%i]: %i", i, listUnknown[i]);
        }
      }

      {
        logColor(B_RED, "    Effect List Unknown2 (u32): %p", &listUnknown2);
        logColor(B_RED, "      size: %i, capacity: %i", listUnknown2.size, listUnknown2.capacity);
        logColor(B_RED, "      elements: ");
        for (u32 i = 0; i < listUnknown2.size; ++i) {
          logColor(B_RED, "        [%i]: %f", i, listUnknown2[i]);
        }
      }
    }
  };

#pragma pack()

};
